
<template>
  <div>
    <el-table data="tableData">
      <el-table-column prop="id" label="序号"></el-table-column>
      <el-table-column prop="username" label="用户名"></el-table-column>
      <el-table-column prop="password" label="密码"></el-table-column>
      <el-table-column prop="email" label="邮件"></el-table-column>
      <el-table-column prop="role" label="身份"></el-table-column>
      <el-table-column prop="avatar" label="头像"></el-table-column>
      <el-table-column  label="操作">
        <template v-slot="scope">
          <el-button type = "primary" plain>编辑</el-button>
          <el-button type = "danger" plain>删除</el-button>
        </template>
      </el-table-column>

    </el-table>
  </div>

</template>

<script>
export default {
  name: "user.vue",
  data(){
    return {
      tableData:[],
      users:[]
    }
  },
  mounted() {
    $request.get('/user/selectAll').then(res=>{
      this.tableData=res.data;
    })
  }
}
</script>

<style scoped>

</style>